package com.shidaimanong.demo.thread;

/**
 * 学编程，关注：十代码农
 * 抖音、快手、B站、西瓜视频、今日头条
 */
public class ThreadDemo1 {
    public static void main(String[] args) {
        new Thread(new Runnable() {
            @Override
            public void run() {
                for (int i = 1; i <= 10; i++) {
                    System.out.println("线程运行中。。。" + i);

                    // 让线程睡眠一会
                    try {
                        Thread.sleep(50);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                }
            }
        }).start();
    }
}
